﻿<%@ Page Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="Admin_ThongTin.aspx.cs" Inherits="ppm_BaByShop.WebForm27" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        THÔNG TIN ADMIN</p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConflictDetection="CompareAllValues" 
            ConnectionString="<%$ ConnectionStrings:ppm_BaByShopConnectionString1 %>" 
            DeleteCommand="DELETE FROM [KHACH_HANG] WHERE [ma_kh] = @original_ma_kh AND [ho_ten] = @original_ho_ten AND [dia_chi] = @original_dia_chi AND [dien_thoai] = @original_dien_thoai AND [ngay_sinh] = @original_ngay_sinh AND [nick] = @original_nick AND [pass] = @original_pass AND [ma_loai_kh] = @original_ma_loai_kh AND [email] = @original_email" 
            InsertCommand="INSERT INTO [KHACH_HANG] ([ho_ten], [dia_chi], [dien_thoai], [ngay_sinh], [nick], [pass], [ma_loai_kh], [email]) VALUES (@ho_ten, @dia_chi, @dien_thoai, @ngay_sinh, @nick, @pass, @ma_loai_kh, @email)" 
            OldValuesParameterFormatString="original_{0}" 
            SelectCommand="SELECT * FROM [KHACH_HANG]" 
            UpdateCommand="UPDATE [KHACH_HANG] SET [ho_ten] = @ho_ten, [dia_chi] = @dia_chi, [dien_thoai] = @dien_thoai, [ngay_sinh] = @ngay_sinh, [nick] = @nick, [pass] = @pass, [ma_loai_kh] = @ma_loai_kh, [email] = @email WHERE [ma_kh] = @original_ma_kh AND [ho_ten] = @original_ho_ten AND [dia_chi] = @original_dia_chi AND [dien_thoai] = @original_dien_thoai AND [ngay_sinh] = @original_ngay_sinh AND [nick] = @original_nick AND [pass] = @original_pass AND [ma_loai_kh] = @original_ma_loai_kh AND [email] = @original_email">
            <DeleteParameters>
                <asp:Parameter Name="original_ma_kh" Type="Int32" />
                <asp:Parameter Name="original_ho_ten" Type="String" />
                <asp:Parameter Name="original_dia_chi" Type="String" />
                <asp:Parameter Name="original_dien_thoai" Type="String" />
                <asp:Parameter Name="original_ngay_sinh" Type="String" />
                <asp:Parameter Name="original_nick" Type="String" />
                <asp:Parameter Name="original_pass" Type="String" />
                <asp:Parameter Name="original_ma_loai_kh" Type="Int32" />
                <asp:Parameter Name="original_email" Type="String" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="ho_ten" Type="String" />
                <asp:Parameter Name="dia_chi" Type="String" />
                <asp:Parameter Name="dien_thoai" Type="String" />
                <asp:Parameter Name="ngay_sinh" Type="String" />
                <asp:Parameter Name="nick" Type="String" />
                <asp:Parameter Name="pass" Type="String" />
                <asp:Parameter Name="ma_loai_kh" Type="Int32" />
                <asp:Parameter Name="email" Type="String" />
                <asp:Parameter Name="original_ma_kh" Type="Int32" />
                <asp:Parameter Name="original_ho_ten" Type="String" />
                <asp:Parameter Name="original_dia_chi" Type="String" />
                <asp:Parameter Name="original_dien_thoai" Type="String" />
                <asp:Parameter Name="original_ngay_sinh" Type="String" />
                <asp:Parameter Name="original_nick" Type="String" />
                <asp:Parameter Name="original_pass" Type="String" />
                <asp:Parameter Name="original_ma_loai_kh" Type="Int32" />
                <asp:Parameter Name="original_email" Type="String" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="ho_ten" Type="String" />
                <asp:Parameter Name="dia_chi" Type="String" />
                <asp:Parameter Name="dien_thoai" Type="String" />
                <asp:Parameter Name="ngay_sinh" Type="String" />
                <asp:Parameter Name="nick" Type="String" />
                <asp:Parameter Name="pass" Type="String" />
                <asp:Parameter Name="ma_loai_kh" Type="Int32" />
                <asp:Parameter Name="email" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" 
            AutoGenerateRows="False" DataKeyNames="ma_kh" DataSourceID="SqlDataSource1" 
            Height="50px" Width="125px">
            <Fields>
                <asp:BoundField DataField="ma_kh" HeaderText="ma_kh" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ma_kh" />
                <asp:BoundField DataField="ho_ten" HeaderText="ho_ten" 
                    SortExpression="ho_ten" />
                <asp:BoundField DataField="dia_chi" HeaderText="dia_chi" 
                    SortExpression="dia_chi" />
                <asp:BoundField DataField="dien_thoai" HeaderText="dien_thoai" 
                    SortExpression="dien_thoai" />
                <asp:BoundField DataField="ngay_sinh" HeaderText="ngay_sinh" 
                    SortExpression="ngay_sinh" />
                <asp:BoundField DataField="nick" HeaderText="nick" SortExpression="nick" />
                <asp:BoundField DataField="pass" HeaderText="pass" SortExpression="pass" />
                <asp:BoundField DataField="ma_loai_kh" HeaderText="ma_loai_kh" 
                    SortExpression="ma_loai_kh" />
                <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                    ShowInsertButton="True" />
            </Fields>
        </asp:DetailsView>
    </p>
</asp:Content>
